<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
         img {
            display: block;
            margin: 200px auto;
            width: 300px;
            border-radius: 50%;
            border: 5px solid royalblue;
        }
        a:hover img {
            border: 5px solid pink;
            /* transform: rotate(360deg);-----旋转360度，deg为单位 */
            transform: rotate(360deg);
            transition: all 4s;
        }
    </style>
</head>
<body>
    <a href=""><img src="images/pig.jpg" alt=""></a>
</body>
</html>